package com.odin.backgrounddownload;

import java.io.File;

public class SGFileUtil
{
    public static long GetFileSize(String filePath)
    {
        File file = new File(filePath);
        return file.length();
    }

    public static boolean IsExists(String filePath)
    {
        File file = new File(filePath);
        return file.exists();
    }

    public static boolean Delete(String filePath)
    {
        File file = new File(filePath);
        return file.delete();
    }

    public static boolean Move(String filePath, String destPath)
    {
        File file = new File(filePath);
        File dest = new File(destPath);
        if (dest.exists())
        {
            dest.delete();
        }
        return file.renameTo(dest);
    }
}
